package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.CoupMerchantCouponEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户商品券（商户购买优惠券，然后送给会员） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-05-11 16:55:17
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CoupMerchantCouponQuery extends CoupMerchantCouponEntity implements Query<CoupMerchantCouponEntity> {

    /** 商户优惠券ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 商品券模板ID查询条件 */
	@JsonUnwrapped(prefix = "coupTemplateId")
	private Condition<String> coupTemplateIdCondition;

    /** 商品券申请ID查询条件 */
	@JsonUnwrapped(prefix = "coupApplyId")
	private Condition<String> coupApplyIdCondition;

    /** 库存总量查询条件 */
	@JsonUnwrapped(prefix = "total")
	private Condition<Integer> totalCondition;

    /** 已发放量查询条件 */
	@JsonUnwrapped(prefix = "granted")
	private Condition<Integer> grantedCondition;

    /** 库存余量查询条件 */
	@JsonUnwrapped(prefix = "stock")
	private Condition<Integer> stockCondition;

    /** 版本查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<Integer> versionCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CoupMerchantCouponQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CoupMerchantCouponQuery(CoupMerchantCouponEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CoupMerchantCouponQuery(CoupMerchantCouponQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.coupTemplateIdCondition != null) {
			this.coupTemplateIdCondition = other.coupTemplateIdCondition.copy();
		}
		if(other.coupApplyIdCondition != null) {
			this.coupApplyIdCondition = other.coupApplyIdCondition.copy();
		}
		if(other.totalCondition != null) {
			this.totalCondition = other.totalCondition.copy();
		}
		if(other.grantedCondition != null) {
			this.grantedCondition = other.grantedCondition.copy();
		}
		if(other.stockCondition != null) {
			this.stockCondition = other.stockCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CoupMerchantCouponEntity> toQueryWrapper() {
		QueryWrapper<CoupMerchantCouponEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (coupTemplateIdCondition != null) {
			coupTemplateIdCondition.toWrapper(wrapper, COL_COUP_TEMPLATE_ID);
		}
		if (coupApplyIdCondition != null) {
			coupApplyIdCondition.toWrapper(wrapper, COL_COUP_APPLY_ID);
		}
		if (totalCondition != null) {
			totalCondition.toWrapper(wrapper, COL_TOTAL);
		}
		if (grantedCondition != null) {
			grantedCondition.toWrapper(wrapper, COL_GRANTED);
		}
		if (stockCondition != null) {
			stockCondition.toWrapper(wrapper, COL_STOCK);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回商户优惠券ID查询条件
	 * 
	 * @return idCondition 商户优惠券ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取商户优惠券ID查询条件
	 * 
	 * @return idCondition 商户优惠券ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置商户优惠券ID查询条件
	 * 
	 * @param idCondition 商户优惠券ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回商品券模板ID查询条件
	 * 
	 * @return coupTemplateIdCondition 商品券模板ID查询条件
	 */
	public Condition<String> coupTemplateId() {
		this.coupTemplateIdCondition = new Condition<>();
		return this.coupTemplateIdCondition;
	}
	
	/**
	 * 获取商品券模板ID查询条件
	 * 
	 * @return coupTemplateIdCondition 商品券模板ID查询条件
	 */
	public Condition<String> getCoupTemplateIdCondition() {
		return coupTemplateIdCondition;
	}

	/**
	 * 设置商品券模板ID查询条件
	 * 
	 * @param coupTemplateIdCondition 商品券模板ID查询条件
	 */
	public void setCoupTemplateIdCondition(Condition<String> coupTemplateIdCondition) {
		this.coupTemplateIdCondition = coupTemplateIdCondition;
	}

	/**
	 * 构造并返回商品券申请ID查询条件
	 * 
	 * @return coupApplyIdCondition 商品券申请ID查询条件
	 */
	public Condition<String> coupApplyId() {
		this.coupApplyIdCondition = new Condition<>();
		return this.coupApplyIdCondition;
	}
	
	/**
	 * 获取商品券申请ID查询条件
	 * 
	 * @return coupApplyIdCondition 商品券申请ID查询条件
	 */
	public Condition<String> getCoupApplyIdCondition() {
		return coupApplyIdCondition;
	}

	/**
	 * 设置商品券申请ID查询条件
	 * 
	 * @param coupApplyIdCondition 商品券申请ID查询条件
	 */
	public void setCoupApplyIdCondition(Condition<String> coupApplyIdCondition) {
		this.coupApplyIdCondition = coupApplyIdCondition;
	}

	/**
	 * 构造并返回库存总量查询条件
	 * 
	 * @return totalCondition 库存总量查询条件
	 */
	public Condition<Integer> total() {
		this.totalCondition = new Condition<>();
		return this.totalCondition;
	}
	
	/**
	 * 获取库存总量查询条件
	 * 
	 * @return totalCondition 库存总量查询条件
	 */
	public Condition<Integer> getTotalCondition() {
		return totalCondition;
	}

	/**
	 * 设置库存总量查询条件
	 * 
	 * @param totalCondition 库存总量查询条件
	 */
	public void setTotalCondition(Condition<Integer> totalCondition) {
		this.totalCondition = totalCondition;
	}

	/**
	 * 构造并返回已发放量查询条件
	 * 
	 * @return grantedCondition 已发放量查询条件
	 */
	public Condition<Integer> granted() {
		this.grantedCondition = new Condition<>();
		return this.grantedCondition;
	}
	
	/**
	 * 获取已发放量查询条件
	 * 
	 * @return grantedCondition 已发放量查询条件
	 */
	public Condition<Integer> getGrantedCondition() {
		return grantedCondition;
	}

	/**
	 * 设置已发放量查询条件
	 * 
	 * @param grantedCondition 已发放量查询条件
	 */
	public void setGrantedCondition(Condition<Integer> grantedCondition) {
		this.grantedCondition = grantedCondition;
	}

	/**
	 * 构造并返回库存余量查询条件
	 * 
	 * @return stockCondition 库存余量查询条件
	 */
	public Condition<Integer> stock() {
		this.stockCondition = new Condition<>();
		return this.stockCondition;
	}
	
	/**
	 * 获取库存余量查询条件
	 * 
	 * @return stockCondition 库存余量查询条件
	 */
	public Condition<Integer> getStockCondition() {
		return stockCondition;
	}

	/**
	 * 设置库存余量查询条件
	 * 
	 * @param stockCondition 库存余量查询条件
	 */
	public void setStockCondition(Condition<Integer> stockCondition) {
		this.stockCondition = stockCondition;
	}

	/**
	 * 构造并返回版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置版本查询条件
	 * 
	 * @param versionCondition 版本查询条件
	 */
	public void setVersionCondition(Condition<Integer> versionCondition) {
		this.versionCondition = versionCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
